package server_proxy

import (
	"go_rpc/gorpc/handler"
	"net/rpc"
)

type HelloServicer interface {
	Hello(request string, reply *string) error
}

// 这里注册鸭子类型HelloServicer接口
func RegisterHelloService(srv HelloServicer) error {
	err := rpc.RegisterName(handler.HelloServiceName, srv)
	if err != nil {
		return err
	}
	return nil
}
